package game.module.hall.logic;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class QipaiConstants {

	public static final byte ROOM_TYPE_DDZ = 1;

	public static final byte ROOM_TYPE_NN = 2;

	public static final byte ROOM_TYPE_SSS = 3;

	public static final byte ROOM_TYPE_MJ = 4;

	public static final byte ROOM_TYPE_MJ_QZ = 5;

	private static final Map<Byte, Short> ROOM_MAX_PERSON = new ConcurrentHashMap<>();

	static {
		ROOM_MAX_PERSON.put(ROOM_TYPE_DDZ, (short) 3);
		ROOM_MAX_PERSON.put(ROOM_TYPE_NN, (short) 5);
		ROOM_MAX_PERSON.put(ROOM_TYPE_SSS, (short) 7);
		ROOM_MAX_PERSON.put(ROOM_TYPE_MJ, (short) 4);
		ROOM_MAX_PERSON.put(ROOM_TYPE_MJ_QZ, (short) 4);
	}

	/**
	 * 获取房间的最大人数
	 * 
	 * @param roomType
	 * @return
	 */
	public static short getMaxCountByRoomType(byte roomType) {
		if (ROOM_MAX_PERSON.containsKey(roomType)) {
			return ROOM_MAX_PERSON.get(roomType);
		}
		return 0;
	}

}
